<?php
class Silk_Dao_Term extends Doctrine_Record
{

    public function setTableDefinition()
    {
        $this->setTableName('silk_term');
        $this->option('charset', 'utf8');
        $this->option('collate', 'utf8_unicode_ci');
        $this->option('type', 'MyISAM');
        $this->hasColumn('term_id', 'integer', 4, array('type' => 'integer' ,'length' => 4, 'unsigned' => 1, 'primary' => true, 'autoincrement' => true ));
        $this->hasColumn('slug', 'string', 255, array('type' => 'string' ,'length' => 255 ));
        $this->hasColumn('name', 'string', 255, array('type' => 'string' ,'length' => 255 ));
        $this->hasColumn('site_id', 'integer', 4, array('type' => 'integer' ,'length' => 4 ));
    }

    public function setUp()
    {
        $this->hasOne('Silk_Dao_Site as Site', array( 'local' => 'site_id', 'foreign' => 'site_id'  ) );
        $this->hasMany('Silk_Dao_TermTaxonomy as TermTaxonomies', array(  'local' => 'term_id', 'foreign' => 'term_id'  ) );
    }


}

 ?>